Use accessor functions to access GtkAlignment
authorJavier Jardón <jjardon@gnome.org>
Tue, 13 Jul 2010 23:45:55 +0000 (01:45 +0200)
committerJavier Jardón <jjardon@gnome.org>
Tue, 13 Jul 2010 23:48:53 +0000 (01:48 +0200)
gtk/gtkbutton.c

index 9785e8dff7e4890f0891e43f7da6aa9c107c95ba..9b2f47557112eefc1e5d8ca5e04d0c757ef3658d 100644 (file)
@@ -647,10 +647,17 @@ maybe_set_alignment (GtkButton *button,
   else if (GTK_IS_ALIGNMENT (widget))
     {
       GtkAlignment *alignment = GTK_ALIGNMENT (widget);
+      gfloat xscale, yscale;
+
+      g_object_get (alignment,
+                    "xscale", &xscale,
+                    "yscale", &yscale,
+                    NULL);
 
       if (priv->align_set)
-       gtk_alignment_set (alignment, priv->xalign, priv->yalign, 
-                          alignment->xscale, alignment->yscale);
+        gtk_alignment_set (alignment,
+                           priv->xalign, priv->yalign,
+                           xscale, yscale);
     }
 }